package com.xgkj.diyiketang.util;



import android.graphics.Bitmap;
import android.widget.ImageView;



public class ImageDownLoadCallback implements ImageCache.ImageCallBack {
	private static final String TAG = "ImageDownloadCallback";
	private ImageView mImageView;
	private String mUrl;
	public ImageDownLoadCallback(ImageView view ,String url){
		if(view == null)return ;
		mImageView = view;
		mUrl = url;
		mImageView.setTag(mUrl);
	}

	@Override
	public void onGetImage(Bitmap bitmap, String url) {
		if(mImageView.getTag() != null && mImageView.getTag().equals(url)){
			mImageView.setImageBitmap(bitmap);
//			mImageView.setBackgroundDrawable(new BitmapDrawable(bitmap));
		}
	}

	@Override
	public void onGetError(String url) {
		
	}

}
